package com.visizen.wisdomclass.server.client;

import com.visizen.wisdomclass.server.model.WcExamType;
import com.visizen.wisdomclass.server.model.WcExamTypeExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;

public interface WcExamTypeMapper {
    @SelectProvider(type=WcExamTypeSqlProvider.class, method="countByExample")
    int countByExample(WcExamTypeExample example);

    @DeleteProvider(type=WcExamTypeSqlProvider.class, method="deleteByExample")
    int deleteByExample(WcExamTypeExample example);

    @Delete({
        "delete from wc_exam_type",
        "where TYPE = #{TYPE,jdbcType=INTEGER}"
    })
    int deleteByPrimaryKey(Integer TYPE);

    @Insert({
        "insert into wc_exam_type (TYPE, NAME)",
        "values (#{TYPE,jdbcType=INTEGER}, #{NAME,jdbcType=VARCHAR})"
    })
    int insert(WcExamType record);

    @InsertProvider(type=WcExamTypeSqlProvider.class, method="insertSelective")
    int insertSelective(WcExamType record);

    @SelectProvider(type=WcExamTypeSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="TYPE", property="TYPE", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="NAME", property="NAME", jdbcType=JdbcType.VARCHAR)
    })
    List<WcExamType> selectByExample(WcExamTypeExample example);

    @Select({
        "select",
        "TYPE, NAME",
        "from wc_exam_type",
        "where TYPE = #{TYPE,jdbcType=INTEGER}"
    })
    @Results({
        @Result(column="TYPE", property="TYPE", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="NAME", property="NAME", jdbcType=JdbcType.VARCHAR)
    })
    WcExamType selectByPrimaryKey(Integer TYPE);

    @UpdateProvider(type=WcExamTypeSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") WcExamType record, @Param("example") WcExamTypeExample example);

    @UpdateProvider(type=WcExamTypeSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") WcExamType record, @Param("example") WcExamTypeExample example);

    @UpdateProvider(type=WcExamTypeSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(WcExamType record);

    @Update({
        "update wc_exam_type",
        "set NAME = #{NAME,jdbcType=VARCHAR}",
        "where TYPE = #{TYPE,jdbcType=INTEGER}"
    })
    int updateByPrimaryKey(WcExamType record);
}